home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 November
/
Ahoy_Magazine_87-11_1987_Double_L.d64
/
Random Order 3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
416b
|
11 lines
1 rem ==================================
2 rem commodares problem #43-3 :
3 rem random order
4 rem solution by
5 rem joe matello
6 rem ==================================
10 input"[147]enter lower limit ";ll : input"enter upper limit ";ul
20 ne=ul-ll+1 : dim rn(ne) : for i=1 to ne:rn(i)=ll-1+i : next : for i=1 to ne
30 r1=int(rnd(0)*ne)+1:r2=int(rnd(0)*ne)+1:te=rn(r1):rn(r1)=rn(r2):rn(r2)=te
40 next:print:for i=1 to ne:print rn(i);: next